Xbasic

FILE.IS_VALID Function

Syntax

Result_Flag as L = file_pointer.Is_Valid()

Returns

Result_FlagLogical

Returns .T. if the file pointer is still valid. Returns .F. if the file pointer is not valid.

Description

Is the current file valid.

Discussion

The .IS_VALID() method tells you if the file object pointer is valid. If you open a file across a network link and the network failed, you can get an invalid result.

Example

dim fp as P
fp = FILE.open("C:\Combobox.Txt", FILE_RO_EXCLUSIVE)
? fp.is_valid()
= .T.

See Also